﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Knihkupectvo.SpocitejCenu
{
    abstract class Komponenta
    {
        public abstract decimal getCena();
        public abstract string getNazev();
    }
   

    class Objednavka : Komponenta
    {
        private const decimal constSleva = 0.9M;
        private decimal CelkovaCena { get;  set; }
        private bool Sleva { get;  set; }

        public Objednavka(decimal cena, bool uplatnujiSlevu)
        {
            this.CelkovaCena = cena;
            this.Sleva = uplatnujiSlevu;        
        }

        public override decimal getCena()
        {
            if (Sleva)
            {
                return CelkovaCena * constSleva;
            }
            else
            {
                return CelkovaCena;
            }
        }

        public override string getNazev()
        {
            return "Objednavka";
        }
    }
    class ObjednavkaTest : ISpocitejCenu
    {
        public ObjednavkaTest(decimal cena, bool jeSleva, bool darkoveBaleni, bool platbaCC, bool eu, bool express)
        {
            this.cena = cena;
            this.jeSleva = jeSleva;
            this.darkoveBaleni = darkoveBaleni;
            this.platbaCC = platbaCC;
            this.eu = eu;
            this.express = express;
        }
        public decimal cena
        {
            get;
            set;
        }

        public bool jeSleva
        {
            get;
            set;
        }

        public bool darkoveBaleni
        {
            get;
            set;
        }

        public bool platbaCC
        {
            get;
            set;
        }

        public bool eu
        {
            get;
            set;
        }

        public bool express
        {
            get;
            set;
        }
    }
}
